Entity Consumable

Consumable is the Entity definition for a consumable item (food, drug, healing).

Subclass of Collectable.

Functions

GetEffectedMainAttribute () GetEffectedMainAttribute returns the name of the attribute that this consumable increases.
GetCategory () GetCategory returns the category of the consumable item.
IsAddicted () IsAddicted returns true if the Consumable item stores an addiction for an Actor.
GetEffectMinimum () GetEffectMinimum returns the minimum increase in the main attribute.
GetEffectMaximum () GetEffectMaximum returns the maximum increase in the main attribute.
GetOverdosePoints () GetOverdosePoints returns the number of overdose points this consumable adds.
GetChanceAddiction () GetChanceAddiction returns the chance of a user being addicted to this consumable.
GetState () GetState returns the state of this Consumable object (e.g.
GetEffectDuration (num) GetEffectDuration returns the duration of the given effect number.
GetEffectMultiplier (num) GetEffectMultiplier returns the multiplier of the given effect number.
GetEffectAttribute (num, attrib) GetEffectAttribute returns the adjustment to the given attribute caused by this effect number.
IsEffectEnabled (num) IsEffectEnabled returns true if the given effect is active.


Functions

GetEffectedMainAttribute ()
GetEffectedMainAttribute returns the name of the attribute that this consumable increases. Most often "hitPoints" for healing items.

Returns:

    A string indicating the attribute affected. Strings match the attribute names from the editor.
GetCategory ()
GetCategory returns the category of the consumable item. Typical values are "chems" and "food".

Returns:

    A string indicating the consumable category.
IsAddicted ()
IsAddicted returns true if the Consumable item stores an addiction for an Actor.

Returns:

    A boolean indicating if this Consumable is an addiction list member.
GetEffectMinimum ()
GetEffectMinimum returns the minimum increase in the main attribute.

Returns:

    An integer value of the minimum attribute increase.
GetEffectMaximum ()
GetEffectMaximum returns the maximum increase in the main attribute.

Returns:

    An integer value of the maximum attribute increase.
GetOverdosePoints ()
GetOverdosePoints returns the number of overdose points this consumable adds.

Returns:

    An integer value of the number of overdose points.
GetChanceAddiction ()
GetChanceAddiction returns the chance of a user being addicted to this consumable.

Returns:

    An integer value of the addiction chance.
GetState ()
GetState returns the state of this Consumable object (e.g. which state is currently active in the user, if any).

Returns:

    An integer value of the active state.
GetEffectDuration (num)
GetEffectDuration returns the duration of the given effect number.

Parameters:

  • num The effect number of the item to get. Should be 0-3. with 3 being the addicted state.

Returns:

    An integer value of the number of minutes this effect number lasts.
GetEffectMultiplier (num)
GetEffectMultiplier returns the multiplier of the given effect number.

Parameters:

  • num The effect number of the item to get. Should be 0-3. with 3 being the addicted state.

Returns:

    A numeric value of the effect multiplier. (Unknown what this value means).
GetEffectAttribute (num, attrib)
GetEffectAttribute returns the adjustment to the given attribute caused by this effect number.

Parameters:

  • num THe effect number of the item to get. Should be 0-3. with 3 being the addicted state.
  • attrib The attribute to check, as a string. Should match attribute strings from the editor.

Returns:

    An integer value of the positive or negative effect on the attribute the numbered effect has.
IsEffectEnabled (num)
IsEffectEnabled returns true if the given effect is active.

Parameters:

  • num The effect number of the item to get. Should be 0-3. with 3 being the addicted state.

Returns:

    A boolean indicating if the effect is active.
generated by LDoc 1.4.6 Last updated 2021-05-07 19:14:47